import "./globals.css";

import type { Metadata } from "next";
import { Inter } from "next/font/google";
import * as React from "react";

import { SiteHeader } from "@/components/site-header";

import { Providers } from "./providers";

const fontSans = Inter({ subsets: ["latin"], variable: "--font-sans" });

export const metadata: Metadata = {
  title: {
    default: "Business Overview",
    template: "%s | Business Overview",
  },
  description: "产值上报与排产协作平台",
};

interface RootLayoutProps {
  children: React.ReactNode;
}

export default function RootLayout({ children }: RootLayoutProps) {
  return (
    <html lang="zh-CN" suppressHydrationWarning>
      <body className={`${fontSans.variable} min-h-screen bg-background antialiased`}>
        <Providers>
          <div className="flex min-h-screen flex-col">
            <SiteHeader />
            <main className="flex-1 bg-background">{children}</main>
            <footer className="border-t border-border bg-background/80 py-6 text-center text-xs text-muted-foreground">
              <p>© {new Date().getFullYear()} Business Overview. 后续迭代将补充更多功能。</p>
            </footer>
          </div>
        </Providers>
      </body>
    </html>
  );
}
